<?php

namespace App\Http\Requests\Admin\WebContent;

use App\Http\Requests\Request;

class UpdateRequest extends Request{
    public function authorize(){
        return true;
    }
    public function rules(){
        return [
            'title' => 'required',
            'sign' => 'required|unique:web_content,sign,'. $this->id,
            'editorvalue' => 'required',
        ];
    }
    public function messages(){
        return [
            'title.required' => '内容标题不能为空',
            'sign.required' => '内容标签不能为空',
            'sign.unique' => '内容标签已经存在',
            'editorvalue.required' => '内容不能为空',
        ];
    }
}
